package com.yzd.xander.entity;

import javax.persistence.*;

/**
 * Created by YE on 2018-06-07.
 */
@Entity
@Table(name = "QunList", schema = "dbo", catalog = "GroupData")
public class QunInfo {
    private int id;
    private int qunNum;
    private Integer mastQq;
    private String createDate;
    private String title;
    private String clazz;
    private String qunText;

    @Id
    @Column(name = "Id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "QunNum")
    public int getQunNum() {
        return qunNum;
    }

    public void setQunNum(int qunNum) {
        this.qunNum = qunNum;
    }

    @Basic
    @Column(name = "MastQQ")
    public Integer getMastQq() {
        return mastQq;
    }

    public void setMastQq(Integer mastQq) {
        this.mastQq = mastQq;
    }

    @Basic
    @Column(name = "CreateDate")
    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "Title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "Class")
    public String getClazz() {
        return clazz;
    }

    public void setClazz(String clazz) {
        this.clazz = clazz;
    }

    @Basic
    @Column(name = "QunText")
    public String getQunText() {
        return qunText;
    }

    public void setQunText(String qunText) {
        this.qunText = qunText;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        QunInfo that = (QunInfo) o;

        if (id != that.id) return false;
        if (qunNum != that.qunNum) return false;
        if (mastQq != null ? !mastQq.equals(that.mastQq) : that.mastQq != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (title != null ? !title.equals(that.title) : that.title != null) return false;
        if (clazz != null ? !clazz.equals(that.clazz) : that.clazz != null) return false;
        if (qunText != null ? !qunText.equals(that.qunText) : that.qunText != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + qunNum;
        result = 31 * result + (mastQq != null ? mastQq.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (clazz != null ? clazz.hashCode() : 0);
        result = 31 * result + (qunText != null ? qunText.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "QunInfo{" +
                "id=" + id +
                ", qunNum=" + qunNum +
                ", mastQq=" + mastQq +
                ", createDate='" + createDate + '\'' +
                ", title='" + title + '\'' +
                ", clazz='" + clazz + '\'' +
                ", qunText='" + qunText + '\'' +
                '}';
    }
}
